<div class=" login">
    <!-- BEGIN LOGO -->
    <div class="logo">
        <img src="{{settings.layoutPath}}/images/browser.png" alt="" width="30" height="30"/>
    </div>
    <!-- END LOGO -->
    <!-- BEGIN LOGIN -->
    <div class="content" style="width: 750px">
        <div ng-class="vm.flash.classNames" ng-bind="vm.flash.message" ng-if="vm.flash"></div>
        <form name="vm.form" class="form-horizontal form-bordered">
            <input type="hidden"  class="form-control" name="planId" ng-model="vm.planfile.planId" name="planId">
            <div class="form-group" ng-class="{
         'has-success': vm.form.fileName.$dirty && vm.form.fileName.$valid,
            'has-error': vm.form.fileName.$touched && vm.form.fileName.$invalid
            }">
                <label class="col-sm-3 control-label" for="fileName"><span class="red-star">*</span>视频名称：</label>

                <div class="col-sm-8">
                    <input type="text" style="float:left;width:220px"placeholder="视频名称" class="form-control" name="fileName" id="fileName"
                           ng-model="vm.planfile.fileName" ng-change="vm.invalid();"  ng-maxlength="40" required>
                    <span class="errorMsg"
                          ng-if="vm.form.fileName.$dirty && vm.form.fileName.$invalid" >
                        <span ng-if="vm.form.fileName.$error.required"><div  style="margin-top: 5px;"><span class="red-star">请输入视频名称</span></div></span>
                        <span ng-if="!vm.form.fileName.$error.required && vm.form.fileName.$invalid"><div  style="margin-top: 5px;"><span class="red-star">计划名称不能超过40位</span></div></span>
                    </span>
                    <div ng-show="serverError" id="error" style="margin-top: 5px;"><span class="red-star">{{ serverError }}</span></div>
                </div>
            </div>
            <!--<div class="form-group" >-->
                <!--<label class="col-sm-3 control-label" for="avatar"><span class="red-star">*</span>上传文件：</label>-->
               <!--<span style="display: none" id="notie"> {{vm.file.name}}&nbsp;&nbsp;<span  id="noties"></span><br></span>-->
                <!--<div class="form-control-static drop-box text-center text-link" id="attachment" ngf-select ngf-drop-->
                     <!--ngf-change="vm.upload($files)" ngf-drag-over-class="{accept:'drop-accept', reject:'drop-reject', delay:100}" accept="video/*,video/mp4">-->
                    <!--<i class="fa fa-fw fa-cloud-upload"></i>点击选择文件<span class="red-star" id="nofile" style="margin-left: 20px;">{{ nofile }}</span>-->
                <!--</div>-->
                <!--&lt;!&ndash;<span ng-if="vm.progress>1"style="margin-left: 10px">{{vm.progress}}%</span>&ndash;&gt;-->
            <!--</div>-->
            <div class="form-group" >
                <label class="col-sm-3 control-label" for="avatar"><span class="red-star">*</span>上传文件：</label>
                <div class="col-sm-8">
                    <span style="display: none;width: 300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="{{vm.file.name}}" id="notie"> {{vm.file.name}}&nbsp;&nbsp;</span><br>
                    <span id="noties"></span><br>
                    <div class="form-control-static drop-box text-center text-link" id="attachment" ngf-select ngf-drop
                         ngf-change="vm.upload($files)" ngf-drag-over-class="{accept:'drop-accept', reject:'drop-reject', delay:100}" accept="video/*,video/mp4">
                        <i class="fa fa-fw fa-cloud-upload"></i>点击选择文件<span class="red-star" id="nofile" style="margin-left: 20px;">{{ nofile }}</span>
                    </div>
                </div>
                <!--<span ng-if="vm.progress>1"style="margin-left: 10px">{{vm.progress}}%</span>-->
            </div>

            <div class="form-group" ng-class="{
         'has-success': vm.form.startTime.$dirty && vm.form.startTime.$valid,
            'has-error': vm.form.startTime.$touched && vm.form.startTime.$invalid
            }">
                <label class="col-sm-3 control-label" for="startTime"><span class="red-star">*</span>开始日期：</label>
                <div class="col-sm-8">
                    <input type="text" style="float:left;width:220px" bs-Datepicker ng-model="vm.planfile.startTime" placeholder="开始日期" name="startTime" class="form-control"  required>
                    <span class="errorMsg"
                          ng-if="vm.form.startTime.$dirty && vm.form.startTime.$invalid">
                        <span ng-if="vm.form.startTime.$error.required"><div  style="margin-top: 5px;"><span class="red-star">请输入开始日期</span></div></span>

                    </span>
                    <span class="errorMsg" ng-if="vm.startTimeInvalid"><div  style="margin-top: 5px;"><span class="red-star">开始日期不能早于当前日期</span></div></span>
                </div>
            </div>
            <div class="form-group" ng-class="{
         'has-success': vm.form.endTime.$dirty && vm.form.endTime.$valid,
            'has-error': vm.form.endTime.$touched && vm.form.endTime.$invalid && vm.form.endTime.$invalid
            }">
                <label class="col-sm-3 control-label" for="endTime"><span class="red-star">*</span>结束日期：</label>

                <div class="col-sm-8">
                    <input type="text" style="float:left;width:220px" bs-Datepicker ng-model="vm.planfile.endTime" placeholder="结束日期" name="endTime" class="form-control"   required>
                    <span class="errorMsg"
                          ng-if="vm.form.endTime.$dirty && vm.form.endTime.$invalid">
                        <span ng-if="vm.form.endTime.$error.required"><div  style="margin-top: 5px;"><span class="red-star">请输入结束日期</span></div></span>
                    </span>
                    <span class="errorMsg" ng-if="vm.timeInvalid"><div  style="margin-top: 5px;"><span class="red-star">结束日期不能早于开始日期</span></div></span>
                </div>
            </div>
            <div class="form-actions">
                <div class="row">
                    <div class="col-md-offset-3 col-md-9">
                        <button type="submit" class="btn green" ng-click="vm.addFile()"
                                ng-disabled="vm.form.$invalid||vm.registerSending||vm.isSend">
                            <i class="fa fa-check"></i>确认
                        </button>
                        <button type="button" class="btn default" ng-click="vm.cancel()">取消</button>
                    </div>
                </div>
            </div>


        </form>
    </div>
</div>

<div>
    <script type="text/ng-template" id="myModalContent.html">
        <div class="modal-header">
            <h4 class="modal-title">保存成功</h4>
        </div>

        <div class="modal-footer">
            <button class="btn btn-primary" type="button" ng-click="ok()">确认</button>
        </div>
    </script>
</div>